import React from 'react'
import { Tabbar } from 'react-vant';
import { Outlet, useNavigate } from 'react-router-dom'
import { zi } from '../../router/index';
function Index() {
  const navigate = useNavigate()


  return (
    <div >

      <Outlet></Outlet>
      <Tabbar onChange={(key) => navigate(key)}>
        {
          zi.map((item,index) => {
            return <Tabbar.Item key={index} icon={item.icon} name={item.path}> {item.title} </Tabbar.Item>
          })
        }
      </Tabbar>

    </div>
  )
}

export default Index
